package com.supreme.nettyapp.generalserver.echoserver.handler;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;

public class EchoServerInitializer extends ChannelInitializer<SocketChannel> {

    public static final EchoServerInitializer INSTANCE = new EchoServerInitializer();

    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        ChannelPipeline pipeline = socketChannel.pipeline();
        //pipeline.addLast(new LoggingHandler(LogLevel.INFO));
        pipeline.addLast(new EchoServerHandler());
    }
}
